    $(document).ready(function() {

	$('.services-icon li').mouseover(function() { 

		$('.services-icon li p').hide();

		$('.services-icon li').removeClass("current"); 

		$(this).addClass('current'); 

		$(this).find("p").show(); 

	});

	$('.nav-master').hover(

	   function() { 

		$('.nav-master-a').hover(

			function(){

				$('.nav-master a').removeClass("current");

				$('.nav-sub').hide();

				$(this).addClass('current'); 

				$(this).next().show();

			},

			function(){}

		);

	   },

	   function() { 

		$('.nav-master a').removeClass("current");

		$('.nav-sub').hide();

		$('#mid').addClass('current');

		$('#mid').next().show();

		$('#sid').addClass('current');

	   }

	)



    });



function addLoadEvent(func) {

  var oldonload = window.onload;

  if (typeof window.onload != 'function') {

    window.onload = func;

  } else {

    window.onload = function() {

      oldonload();

      func();

    }

  }

}



function prepareInputsForHints() {

	var inputs = document.getElementsByTagName("input");

	for (var i=0; i<inputs.length; i++){

		// test to see if the hint span exists first

		if (inputs[i].parentNode.getElementsByTagName("div")[0]) {

			// the span exists!  on focus, show the hint

			inputs[i].onfocus = function () {

				this.parentNode.getElementsByTagName("div")[0].style.display = "inline-block";

			}

			// when the cursor moves away from the field, hide the hint

			inputs[i].onblur = function () {

				this.parentNode.getElementsByTagName("div")[0].style.display = "none";

			}

		}

	}

	// repeat the same tests as above for selects

	var selects = document.getElementsByTagName("select");

	for (var k=0; k<selects.length; k++){

		if (selects[k].parentNode.getElementsByTagName("div")[0]) {

			selects[k].onfocus = function () {

				this.parentNode.getElementsByTagName("div")[0].style.display = "inline-block";

			}

			selects[k].onblur = function () {

				this.parentNode.getElementsByTagName("div")[0].style.display = "none";

			}

		}

	}

}

addLoadEvent(prepareInputsForHints);



function isEmail(strEmail) {
    if (strEmail.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1) {
        return true;
    }
    else {
        return false;
    }
}